package game.breeze.gameserver.message;

import game.breeze.message.AppMessage;
import game.breeze.socket.connection.NetConnection;

public abstract class IMessageable {
	protected NetConnection connection;

	public IMessageable(NetConnection conn) {
		this.connection = conn;
	}

	public void sendMessage(AppMessage message) {
		if (connection != null) {
			connection.sendMessage(message);
		}
	}

	/**
	 * @param connection
	 *            the connection to set
	 */
	public void setConnection(NetConnection connection) {
		this.connection = connection;
	}
}
